package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DishRecipeCategoryManagementMapper;
import com.ruoyi.system.domain.DishRecipeCategoryManagement;
import com.ruoyi.system.service.IDishRecipeCategoryManagementService;

/**
 * 商品做法分类管理信息 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-27
 */
@Service
public class DishRecipeCategoryManagementServiceImpl implements IDishRecipeCategoryManagementService
{
    @Autowired
    private DishRecipeCategoryManagementMapper dishRecipeCategoryManagementMapper;

    /**
     * 通过id查询商品做法分类管理信息
     *
     * @param id 商品做法分类管理信息主键
     * @return 商品做法分类管理信息
     */
    @Override
    public DishRecipeCategoryManagement selectDishRecipeCategoryManagementById(Long id)
    {
        return dishRecipeCategoryManagementMapper.selectDishRecipeCategoryManagementById(id);
    }

    /**
     * 通过分类名称查询商品做法分类管理信息列表
     *
     * @param categoryName 分类名称
     * @return 商品做法分类管理信息
     */
    @Override
    public List<DishRecipeCategoryManagement> selectDishRecipeCategoryManagementListByName(String categoryName)
    {
        return dishRecipeCategoryManagementMapper.selectDishRecipeCategoryManagementListByName(categoryName);
    }

    /**
     * 新增商品做法分类管理信息
     *
     * @param dishRecipeCategoryManagement 商品做法分类管理信息
     * @return 结果
     */
    @Override
    public int insertDishRecipeCategoryManagement(DishRecipeCategoryManagement dishRecipeCategoryManagement)
    {
        return dishRecipeCategoryManagementMapper.insertDishRecipeCategoryManagement(dishRecipeCategoryManagement);
    }

    /**
     * 修改商品做法分类管理信息
     *
     * @param dishRecipeCategoryManagement 商品做法分类管理信息
     * @return 结果
     */
    @Override
    public int updateDishRecipeCategoryManagement(DishRecipeCategoryManagement dishRecipeCategoryManagement)
    {
        return dishRecipeCategoryManagementMapper.updateDishRecipeCategoryManagement(dishRecipeCategoryManagement);
    }

    /**
     * 通过id批量删除商品做法分类管理信息
     *
     * @param ids 需要删除的商品做法分类管理信息主键
     * @return 结果
     */
    @Override
    public int deleteDishRecipeCategoryManagementByIds(Long[] ids)
    {
        return dishRecipeCategoryManagementMapper.deleteDishRecipeCategoryManagementByIds(ids);
    }

    /**
     * 通过id删除商品做法分类管理信息
     *
     * @param id 商品做法分类管理信息主键
     * @return 结果
     */
    @Override
    public int deleteDishRecipeCategoryManagementById(Long id)
    {
        return dishRecipeCategoryManagementMapper.deleteDishRecipeCategoryManagementById(id);
    }
}
